package com.dongrj.framework.starter.sms.enums;

import lombok.Getter;

@Getter
public enum SmsEnum {
    ALiYun(1, "阿里云"),
    Tencent(2, "腾讯云"),
    HuaWei(3, "华为云"),
    WeiDaoYun(4, "蔚岛云"),
    FeiGe(5, "飞鸽");

    private final int code;

    private final String name;

    SmsEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static SmsEnum fromCode(int code) {
        for (SmsEnum status : values()) {
            if (status.code == code) {
                return status;
            }
        }
        return null;
    }
}
